[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Read procedure
TEXT FILES
DECLARATION: Read( [var F : Text;] v1 [, v2,...,vN] )
PURPOSE: Reads one or more components from a text file into one or
more variables
UNIT: System
REMARKS: If the text file identifier (F) is omited, the standard file
variable, Input, is assumed. v1..vN must be variable(s) of
integer, real, char or string type. If EOLN(F) was TRUE
before Read was executed, the returned value will be Chr(13),
and the next Read will start with the next character in the
file. If EOF(F) was TRUE before Read was executed, the
returned value will be Chr(26).
NOTE: Using Read with a string-type variable does not move
current pointer to the next line after reading. You
should use ReadLn to read strings and move the CP
past the EOLN marker.
TYPED FILES
DECLARATION: Read(F, v1 [, v2,...,vN] )
PURPOSE: Reads one or more components from a typed file into one
or more variables
UNIT: System
REMARKS: F is a file of any type, except Text, and each variable
must be of the same type as the component type of F. For
each component read, the CP is advanced forward to the next
component.
NOTE: With {$I-}, errors are returned through IOResult
RESTRICTIONS: File must be previously Assigned and Opened
See Also:
Readln
ReadKey
Write
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson